define(function(require, exports, module){
	var mId = 'index',
		tpl = require("{view}index.tpl"),

	view = {

		template: _.template(tpl),
		render:function(){
			var time,eachFun;
			$("#"+mId).remove();
			$("body").append(this.template());
			$("#"+mId).show();
			share.loading('hide');
			this.preload();
			
			setTimeout(function(){
				window.location.href = '#found';
			},3100);

			// $("#"+mId).find('i').text(3);
			time = 0;
			eachFun = 
				setInterval(function(){
					// console.log(time)0,1,2,3
					$("#"+mId).find('i').text(2-time);
					if(time >= 2){
						clearInterval(eachFun);
					};
					time++;
				},1000);
		},
		preload:function(){
			var arr = ['{controller}found','{controller}play']
			require.async(arr);
		}
	};

	view.userNav = false;
	module.exports =  view;
});

